import * as Sequelize from 'sequelize';
import sequelize from './../core/mysqlDb';

export interface Roles {
    id: number;
    loginName:string;
    pwd:string;
    roleName:string;
    roleCode:string;
}
export interface Rolesstance extends Sequelize.Instance<Roles>, Roles {
}

// export const rolesModel = sequelize.define<Rolesstance, Roles>('roles', {
//     loginName:Sequelize.STRING,
//     pwd:Sequelize.STRING,
//     roleName:Sequelize.STRING,
//     roleCode:Sequelize.STRING
// });

export const rolesModel = sequelize.define('roles', {
    loginName:Sequelize.STRING,
    pwd:Sequelize.STRING,
    roleName:Sequelize.STRING,
    roleCode:Sequelize.STRING
});

rolesModel.sync();
export default rolesModel;
